'use strict';

module.exports = app => {
    const {
        DATE,
        STRING,
        INTEGER
    } = app.Sequelize;
    const journal_list = app.model.define('journal_list',{
        id:{
            type:INTEGER,
            primaryKey:true,
            autoIncrement:true,
            allowNull:false,
            comment:"日志列表ID"
        },
        userName:{
            type:STRING,
            defaultValue:null,
            comment:"用户"
        },
        journal_class:{
            type:STRING,
            defaultValue:null,
            comment:"日志类型"
        },
        model_name:{
            type:STRING,
            defaultValue:null,
            comment:"模块名称"
        },
        start_date:{
            type:DATE,
            defaultValue:null,
            comment:"开始日期"
        },
        end_date:{
            type:DATE,
            defaultValue:null,
            comment:"结束日期"
        },
        operate_date:{
            type:DATE,
            defaultValue:null,
            comment:"操作时间"
        },
        operate_model:{
            type:STRING,
            defaultValue:null,
            comment:"操作模块"
        },
        operate_class:{
            type:STRING,
            defaultValue:null,
            comment:"操作类型"
        },
        bo_value:{
            type:INTEGER,
            defaultValue:null,
            comment:"操作前的值"
        },
        ao_value:{
            type:INTEGER,
            defaultValue:null,
            comment:"操作后的值"
        }
    })
    journal_list.associate = function () {
        
    }
}